<template>
	<view class="bac">
		<image src="../static/qdy.png" mode="" class="uni-images"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onLoad() {
				try {
					// 获取本地存储中launchFlag标识
					const value = uni.getStorageSync('launchFlag');
					if (value) {
						// launchFlag=true直接跳转到首页
						setTimeout(()=>{
							uni.switchTab({
								url: '/pages/index/index'
							});
							
						},1500)
					}else{
						setTimeout(()=>{
							uni.navigateTo({
								url:'./init'
							})
						},1500)
					}
				} catch(e) { 
					// error 
					uni.setStorage({ 
						key: 'launchFlag', 
						data: true, 
						success: function () {
							console.log('error时存储launchFlag');
						} 
					}); 
				}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped> 
page{
	width: 100%;
	height: 100%;
}
.bac{
	width: 100%;
	height: 100%;
	.uni-images{
		width: 100%;
		height: 100%;
	}
}
</style>
